from fastapi import FastAPI
from myapp.routers import users, items  # 绝对导入
from myapp.config import settings       # 配置导入

app = FastAPI(title=settings.APP_NAME)

# 挂载路由
app.include_router(users.router)
app.include_router(items.router)

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)